package com.cy.store.service;

import com.cy.store.vo.CartVo;

import java.util.List;

public interface ICartService {

    /**
     * 添加购物车
     * @param uid
     * @param pid
     * @param amount
     * @param username
     */
     void addToCart(Integer uid, Integer pid, Integer amount, String username);

    /**
     * 获得购物车完整数据
     * @param uid
     * @return
     */
     List<CartVo> getVoByUid(Integer uid);

    /**
     * 更新用户购物车数据的数量
     * @param cid
     * @param username
     * @param uid
     * @param operation 判断加减
     * @return
     */
     Integer addNum(Integer cid, String username, Integer uid, String operation);

    /**
     * 查询勾选的购物车数据
     * @param cids
     * @param uid
     * @return
     */
     List<CartVo> getVoByCid(List<Integer> cids,Integer uid);
}
